<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="xdz" uri="/xdztools" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>新增菜单</title>
<link href="${xdz:domain() }/css/bootstrap.min.css" rel="stylesheet">
<link href="${xdz:domain() }/css/font-awesome.min.css" rel="stylesheet">
<link href="${xdz:domain() }/css/animate.min.css" rel="stylesheet">
<link rel="stylesheet" href="${xdz:domain() }/css/parsley.css" >
<%-- <link href="${xdz:domain() }/css/style.min.css" rel="stylesheet"> --%>
<link rel="stylesheet" type="text/css" href="${xdz:domain() }/js/plugins/jquery-fontIconPicker/css/jquery.fonticonpicker.css" />
<link rel="stylesheet" type="text/css" href="${xdz:domain() }/js/plugins/jquery-fontIconPicker/themes/bootstrap-theme/jquery.fonticonpicker.bootstrap.min.css" />
<script type="text/javascript" src="${xdz:domain() }/js/fa-icon-source.js" ></script>
<script src="${xdz:domain() }/js/jquery.min.js"></script>
<script src="${xdz:domain() }/js/bootstrap.min.js"></script>
<script src="${xdz:domain() }/js/plugins/parsley/parsley.min.js"></script>
<script src="${xdz:domain() }/js/plugins/parsley/zh_cn.js"></script>
<script type="text/javascript" src="${xdz:domain() }/js/plugins/jquery-fontIconPicker/jquery.fonticonpicker.min.js"></script>
<script type="text/javascript">
	$(function() {
		/**
		 * Init the fontIconPickers on the jumbotron
		 */
		$('#iconImage').fontIconPicker({
			source: fa_icons,
			searchSource: fa_icons,
			//useAttribute: true,
			theme: 'fip-bootstrap',
			//attributeName: 'data-icomoon',
			emptyIconValue: 'none',
		});
	
	});
	function back(){
    		 history.go(-1);
 	}
 </script>
</head>

<body>
    <form action="../systemMenuBase/insert" class="form-horizontal" id="systemMenuBaseForm" data-parsley-validate method="post">
        <div class="panel panel-default">
	    	<div class="panel-heading">
	            <div class="panel-title">菜单新增维护</div>
	   		</div>
            <div class="panel-body">       
                   <div class="form-group">
                        <label class="col-md-2 control-label">上级菜单</label>
                        <div class="col-md-8">
	                        <select name="parentId" class="bg-focus form-control" required="required">
								<option value="0">--根菜单--</option>
								<c:forEach var="i" items="${list}">
									<option value="${i.menuId}" <c:if test="${copy == 1 and i.menuId==systemMenuBase.parentId }">selected</c:if>>${i.menuName }</option>
								</c:forEach>
							</select>
						</div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-md-2 control-label">菜单图像</label>
                        <div class="col-md-8">
                            <input type="text" name="iconImage" placeholder="" id="iconImage" class="bg-focus form-control" >
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">菜单名</label>
                        <div class="col-md-8">
                            <input type="text" name="menuName" placeholder="" id="menuName" class="form-control" required="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">菜单地址</label>
                        <div class="col-md-8">
                            <input type="text" name="menuUrl" placeholder="" id="menuUrl" class="bg-focus form-control"  <c:if test="${copy == 1 }">value="${systemMenuBase.menuUrl }"</c:if>>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">增加菜单地址</label>
                        <div class="col-md-8">
                            <input type="text" name="addUrl" placeholder="" id="addUrl" class="bg-focus form-control" <c:if test="${copy == 1 }">value="${systemMenuBase.addUrl }"</c:if>>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">删除菜单地址</label>
                        <div class="col-md-8">
                            <input type="text" name="deleteUrl" placeholder="" id="deleteUrl" class="bg-focus form-control" <c:if test="${copy == 1 }">value="${systemMenuBase.deleteUrl }"</c:if>>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">修改菜单地址</label>
                        <div class="col-md-8">
                            <input type="text" name="updateUrl" placeholder="" id="updateUrl" class="bg-focus form-control" <c:if test="${copy == 1 }">value="${systemMenuBase.updateUrl }"</c:if>>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">查询菜单地址</label>
                        <div class="col-md-8">
                            <input type="text" name="selectUrl" placeholder="" id="selectUrl" class="bg-focus form-control" <c:if test="${copy == 1 }">value="${systemMenuBase.selectUrl }"</c:if>>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">排序号</label>
                        <div class="col-md-8">
                            <input type="text" name="orderBy" placeholder="" id="orderBy" class="bg-focus form-control" required="required" <c:if test="${copy == 1 }">value="${systemMenuBase.orderBy }"</c:if>>
                        </div>
                    </div>
                  
                     <div class="form-group">
                       <label class="col-md-2 control-label"></label>
		                <div class="col-md-8 col-offset-1">
		                  <button type="submit" class="btn btn-primary">保存</button>
		                  <button type="button" class="btn btn-white" onclick="back()">取消</button>
		                </div>
		            </div>
                </div>
        </div>
    </form>
</body>

</html>
